package com.traffic.managent.model.system;

import com.traffic.managent.annotation.ModelBind;
import com.traffic.managent.base.CxBaseModel;
import com.traffic.managent.jedis.RedisKit;
import com.traffic.managent.plugin.ParamInitThread;

@ModelBind(table = "cx_operator", key = "ids")
public class Operator extends CxBaseModel<Operator> {

	private static final long serialVersionUID = 1L;
	public static final Operator dao = new Operator();

	
	/**
	 * 添加或者更新缓存
	 */
	public void cacheAdd(String ids) {
		Operator operator = Operator.dao.findById(ids);
		RedisKit.put(ParamInitThread.cacheStart_operator + ids, operator);
		RedisKit.put(ParamInitThread.cacheStart_operator + operator.getStr("url"), operator);
	}
}